/**
 * @author scylla
 * @version V1.0
 * @Project echo-java-base
 * @Title 整数生成器
 * @Description *
 * @Package concurrent.mthread.bf
 * @Since 2021/8/12 4:32 下午
 */
package concurrent.mthread.bf;

public abstract class IntGenerator {

    private volatile boolean canceled = false;

    public abstract int next();

    public void cancel() {
        canceled = true;
        System.err.println("This generator is be canceled!");
    }

    public boolean isCanceled() {
        return canceled;
    }
}
